package com.css.fxfzypg.modules.qhmapfiles.service;

import com.alibaba.fastjson.JSONObject;
import com.css.fxfzypg.modules.qhmapfiles.repository.entity.QhMapFilesEntity;
import com.css.fxfzypg.modules.qhmapfiles.viewobjects.QhMapFilesQueryParams;

import java.util.List;

/**
 * @author zyt
 * @date 2022-04-18
 */

public interface QhMapFilesService {

    public QhMapFilesEntity getQhMapFilesById(String id);

    public QhMapFilesEntity saveQhMapFiles(QhMapFilesEntity qhSiteClassResult);

    public QhMapFilesEntity updateQhMapFiles(QhMapFilesEntity qhSiteClassResult);

    public void deleteQhMapFiles(List<String> ids);

    public JSONObject getQhMapFiles(QhMapFilesQueryParams queryParams);

    public JSONObject searchQhMapFiles(QhMapFilesQueryParams queryParams);

    public int deleteQhMapFilesByFileName(List<String> fileNames, String province) throws Exception;

    //根据参数删除文件
    public int deleteQhMapFilesByParams(QhMapFilesQueryParams queryParams) throws Exception;

    //根据参数查询文件列表
    public List<QhMapFilesEntity> searchQhMapFilesByParams(QhMapFilesQueryParams queryParams);

    //根据参数查询文件列表
    int searchQhMapFilesNumByParams(QhMapFilesQueryParams queryParams);

    //根据参数按省市县查询文件
    public List<QhMapFilesEntity> searchQhMapFilesByParamsProvinceCityArea(QhMapFilesQueryParams queryParams);

    //查询所有未保存的文件
    public List<QhMapFilesEntity> searchAllUnsaveQhMapFiles();

    //根据保存状态、文件类型、省市县参数，查询上传文件数量
    public int lookUpMapFiles(String saveType, String type, String qualityStatus, String province, String city, String area);

    //查询上传省市县的上一级和下一级文件省市县名称提示
    public String lookUpMapFilesByLevel(String type, String province, String city, String area);

    //根据类型保存到数据库不同表
    public String saveQhMapFilesToDatabaseByType(QhMapFilesEntity qhMapFilesEntity) throws Exception;

    //批量更新为已删除状态
    public int updateLogicDeleteQhMapFiles(List<QhMapFilesEntity> list) throws Exception;

    //批量更新为已保存状态
    public int updateSaveQhMapFiles(List<QhMapFilesEntity> list) throws Exception;

    //更新为已保存状态
    public int updateSaveQhMapFile(QhMapFilesEntity qhMapFilesEntity) throws Exception;

    //更新为正在保存状态
    public int updateSaveNowQhMapFile(QhMapFilesEntity qhMapFilesEntity) throws Exception;

    List<QhMapFilesEntity> getSlopeFileByDivisionAndType(String province, String city, String county, String type);
}
